<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page import="java.util.*" %>
<%
	String login = (String)request.getAttribute("Login");
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>User Login</title>
<style type="text/css">
<!--
body {
	background-image: url(images/bg/pagebg.gif);
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style2 {font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
}
-->
</style>

<SCRIPT language=Javascript>
function window_onload(){
	if(login.equals("Failed")){
		alert("Make sure you entered valid ID and Password");
		System.out.println("I am in onload");
	}
}
function trim(sString) {
   sTrimmedString = "";
   if (sString != "") {
      var iStart = 0;
      var iEnd = sString.length - 1;
      var sWhitespace = " \t\f\n\r\v";

      while (sWhitespace.indexOf(sString.charAt(iStart)) != -1) {
         iStart++;
         if (iStart > iEnd)
            break;
      }

      // If the string not just whitespace
      if (iStart <= iEnd) {
         while (sWhitespace.indexOf(sString.charAt(iEnd)) != -1)
            iEnd--;
         sTrimmedString = sString.substring(iStart,++iEnd);
      }
   }
   return sTrimmedString;
}

function validate() {
	var ms = navigator.appVersion.indexOf("MSIE")
	if  (navigator.appName != 'Microsoft Internet Explorer') {
	  alert("Tracker is compatible with 'Microsoft Internet Explorer' version 5.5 or higher only. Please upgrade to the latest version of 'Microsoft Internet Explorer' and try again");
	  document.loginForm.txtCORP_LOGIN.focus();
	  return false; }
	ie4 = (ms>0) && (parseInt(navigator.appVersion.substring(ms+5, ms+6,ms+7)) <= 4)
	if(ie4) {
	  alert("Tracker is compatible with 'Microsoft Internet Explorer' version 5.5 or higher only. Please upgrade to the latest version of 'Microsoft Internet Explorer' and try again");
	  document.loginForm.txtCORP_LOGIN.focus();
	  return false;
	}

	//User login
	var jsUSER_LOGIN = trim(document.all.UserName.value)
	if (jsUSER_LOGIN.length==0) {
	  document.all.UserName.focus();
	  alert("User Login cannot be blank");
	  return false;
	}
	if (jsUSER_LOGIN.length < 4) {
	  document.all.UserName.focus();
	  alert("User Login must be at least 4 characters long.");
	  return false;
	}

	//User password
	var jsPASSWORD = trim(document.all.Password.value)
	if (jsPASSWORD.length==0) {
	  document.all.Password.focus();
	  alert("Password cannot be blank");
	  return false;
	}
}

function onfocuscolor() {
	window.event.srcElement.style.backgroundColor = "white";
}

function onblurcolor() {
	window.event.srcElement.style.backgroundColor = "#D6D6D6"
}

function labelmouseover() {
	window.event.srcElement.style.color = "blue";
}

function labelmouseout() {
	window.event.srcElement.style.color = "black";
}

function labelmouseoverlight() {
	window.event.srcElement.style.color = "#00FFFF";
}

function labelmouseoutlight() {
	window.event.srcElement.style.color = "white";
}
</SCRIPT>
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<link href="joju.css" rel="stylesheet" type="text/css" />
</head>

<body onload="MM_preloadImages('images/menu2_01.jpg','images/menu2_02.jpg','images/menu2_03.jpg','images/menu2_04.jpg','images/menu2_05.jpg','images/menu2_06.jpg','images/menu2_07.jpg ','images/menu2_08.jpg')">
<FORM id="loginForm" name="loginForm" onsubmit="javascript: return validate();" action="Login.do" method="post">
<center>
  <table id="Table_01" width="1002" height="439" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td height="101" align="left" valign="top"><img src="images/index_01.jpg" width="1002" height="101" alt="" /></td>
    </tr>
    <tr>
      <td height="46" align="left" valign="top"><table id="Table_3" width="1002" height="46" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td><img src="images/menu_09.jpg" width="333" height="46" alt="" /></td>
            <td><img src="images/menu_10.jpg" width="5" height="46" alt="" /></td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td height="292" align="left" valign="top"><table id="Table_" width="1002" height="281" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="2" bgcolor="#A1C0DF"><img src="images/content_01.jpg" width="226" height="1" alt="" /></td>
            <td><img src="images/content_02.jpg" width="776" height="1" alt="" /></td>
          </tr>
          <tr>
            <td valign="top" bgcolor="#A1C0DF">&nbsp;</td>
            <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="26%" bgcolor="#FFFFFF">&nbsp;</td>
                  <td width="6%" bgcolor="#FFFFFF"><br />
                      <br />
                      <br /></td>
                  <td width="16%" bgcolor="#FFFFFF">&nbsp;</td>
                  <td width="40%" bgcolor="#FFFFFF">&nbsp;</td>
                  <td width="12%" bgcolor="#FFFFFF">&nbsp;</td>
                </tr>
                <tr>
                  <td bgcolor="#FFFFFF">&nbsp;</td>
                  <td colspan="3" rowspan="3" align="left" valign="top" bgcolor="#FFFFFF"><table id="Table_2" width="407" height="251" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td><img src="images/login_01.jpg" width="11" height="11" alt="" /></td>
                        <td background="images/login_02.jpg"><img src="images/login_02.jpg" width="384" height="11" alt="" /></td>
                        <td><img src="images/login_03.jpg" width="12" height="11" alt="" /></td>
                      </tr>
                      <tr>
                        <td background="images/login_02.jpg"><img src="images/login_04.jpg" width="11" height="224" alt="" /></td>
                        <td align="left" valign="top" background="images/bg/loginbg.jpg"><table cellspacing="0" cellpadding="0" width="95%" 
                          border="0">
                            <tbody>
                              <tr class="style2">
                                <td class="marginscontact">&nbsp;</td>
                                <td class="marginscontact">&nbsp;</td>
                                <td class="marginscontact">&nbsp;</td>
                              </tr>
                              <tr class="style2">
                                <td class="marginscontact"><img src="images/login.jpg" alt="alt" width="109" height="48" /></td>
                                <td class="marginscontact">&nbsp;</td>
                                <td class="marginscontact">&nbsp;</td>
                              </tr>
                              <tr class="style2">
                                <td height="17" class="marginscontact">&nbsp;</td>
                                <td class="marginscontact">&nbsp;</td>
                                <td class="marginscontact">&nbsp;</td>
                              </tr>
                              <tr class="style2">
                                <td class="marginscontact" width="35%"><div align="right" class="normalcontent">User Id <span 
                              class="mandatory">:</span></div></td>
                                <td class="marginscontact" width="2%">&nbsp;</td>
                                <td class="marginscontact" width="63%"><input 
                              class="box" id="UserName" size="31" name="UserName"  value="@cgi.com"/></td>
                              </tr>
                              <tr class="style2">
                                <td class="marginscontact"><div align="right" class="normalcontent">Password <span 
                              class="mandatory">:</span></div></td>
                                <td class="marginscontact">&nbsp;</td>
                                <td class="marginscontact"><input  id="Password" class="box" size="31" 
                              name="Password" type="password" /></td>
                              </tr>
                              <tr class="style2">
                                <td class="marginscontact"><div align="right" class="normalcontent">Project Id :</div></td>
                                <td class="marginscontact">&nbsp;</td>
                                <td class="marginscontact"><input class="box" id="phone" 
                              size="31" name="phone" /></td>
                              </tr>
                              <tr class="style2">
                                <td class="marginscontact">&nbsp;</td>
                                <td class="marginscontact">&nbsp;</td>
                                <td class="marginscontact">&nbsp;</td>
                              </tr>
                              <tr>
                                <td valign="top" class="marginscontact">&nbsp;</td>
                                <td valign="top" class="marginscontact">&nbsp;</td>
                                <td class="marginscontact" valign="center"><div align="left">
                                    <input type="submit" id="btnGO"  value="Go" name="btnGO"/>
                                </div></td>
                              </tr>
                            </tbody>
                        </table></td>
                        <td background="images/login_06.jpg"><img src="images/login_06.jpg" width="12" height="224" alt="" /></td>
                      </tr>
                      <tr>
                        <td><img src="images/login_07.jpg" width="11" height="16" alt="" /></td>
                        <td bgcolor="#F3F7FA"><img src="images/login_08.jpg" width="384" height="16" alt="" /></td>
                        <td><img src="images/login_09.jpg" width="12" height="16" alt="" /></td>
                      </tr>
                  </table></td>
                  <td bgcolor="#FFFFFF">&nbsp;</td>
                </tr>
                <tr>
                  <td bgcolor="#FFFFFF">&nbsp;</td>
                  <td bgcolor="#FFFFFF">&nbsp;</td>
                </tr>
                <tr>
                  <td bgcolor="#FFFFFF">&nbsp;</td>
                  <td bgcolor="#FFFFFF"><br />
                      <br />
                      <br />
                      <br />
                      <br />
                      <br />
                      <br />
                      <br />
                      <br />
                      <br />
                      <br />
                      <br />
                      <br />
                      <br />
                      <br />
                      <br />
                      <br />
                      <br /></td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td height="19" colspan="2" valign="top" bgcolor="#CCCCCC"><span class="contentwhitesatheesh">&copy;2010 Joju's Software. All rights reserved.</span></td>
          </tr>
      </table></td>
    </tr>
  </table>
</center>
<% System.out.println("in logpage " + new java.util.Date()); 
session.setAttribute("Log", "YES");%>
</FORM>
</body>
</html>
